<template>
	<view class="con-box">
		<u-navbar title="" height="120upx">
			<view class="u-nav-slot" slot="left">
				<view @tap="back" class="icon-left">
					<u-icon name="arrow-left" color="#fff" size="26"></u-icon>
				</view>
			</view>
			<view class="u-nav-slot logoBox" slot="center">
				<view class="navBox">
					关于我们
				</view>
			</view>
			<view class="u-nav-slot" slot="right">
				<view class="icon-right"></view>
			</view>
		</u-navbar>
		
		<view class="wrap">
			<view class="logo">
				<image src="@/static/login/logo.png" class="img" mode="widthFix"></image>
			</view>
			<view class="edition">Version 2.0.0</view>
			<view class="title">法律文件</view>
			
			<view class="fileBox" v-for="(item,index) in tabList" :key="index" @tap="navTo(item)">
				<text>{{item.title}}</text>
				<u-icon name="arrow-right" color="#999" size="30upx"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				tabList:[
					{
						title:'隐私政策',
						path:'/pages/login/agreement?type=yinsixieyikey',
						isLogin:false,
					},
					{
						title:'平台协议',
						path:'/pages/login/agreement?type=pingtaifuwukey',
						isLogin:false,
					},
					{
						title:'转让规则',
						path:'/pages/login/agreement?type=pingtaifuwukey',
						isLogin:false,
					}
				]
			}
		},
		methods:{
			navTo(cur){
				let url = cur.path;
				uni.navigateTo({
					url:url
				});
			},
			back(){
				let canNavBack = getCurrentPages();
				if(canNavBack && canNavBack.length>1) {  
				    uni.navigateBack({  
				      delta: 1  
				    });  
				} else {  
				    history.back();  
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.con-box {
		min-height: 100vh;
		padding-top: 120upx;
		background-color: #fff;
		.logoBox{
			width: 100%;
			height: 100%;
			.navBox{
				height: 120upx;
				background-image: url("@/static/common/bg1.png");
				background-size: 100% 100%;
				background-repeat: no-repeat;
				display: flex;
				align-items: center;
				justify-content: center;
				color: #fff;
			}
		}
		
		.wrap{
			padding: 0 60upx;
			padding-top: 188upx;
			text-align: center;
			font-size: 24upx;
			.fileBox{
				text{font-size: 30upx;}
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 30upx 0;
				border-bottom: 1px solid #F7F7F7;
			}
			.title{
				text-align: left;
				color: #999;
				padding-top: 60upx;
				padding-bottom: 20upx;
				border-bottom: 1px solid #F7F7F7;
			}
			.logo{
				display: flex;
				align-items: center;
				justify-content: center;
				padding-bottom: 56upx;
				.img{
					width: 176upx;
				}
			}
			
			.edition{
				font-size: 30upx;
				line-height: 30upx;
				color: #333;
			}
		}
	}
</style>
